Skip to main content

polylines

Type

property

Summary

Polylines on the map

Syntax

set the polylines of <widget> to <pMarkerData>
get the polylines of <widget>

Description

Allows the display of polylines connecting specified points on the map, with the given width and color.

The polyline array has the following form: { tag for polyline: { "coordinates": list of coordinates of the polyline, "color": optional color of the polyline, "width": optional width of the polyline in pixels }, tag for polyline: { ... }, ... }

If the color is not given, black is used. If the width is not given, 2 is used.

Examples

-- draw some parallel lines over Scotland
local tPolylines
put "55.9533,-3.1883,55.8533,-3.1883" into tPolylines[1]["coordinates"]
put "255,0,0" into tPolylines[1]["color"]
put "5" into tPolylines[1]["width"]
put "54.9533,-3.1883,54.8533,-3.1883" into tPolylines[2]["coordinates"]
set the polylines of widget "Map" to tPolylines

Compatibility and Support

OS

mac

ios

android

web

Platforms

desktop

mobile